package com.goldcn.enumType;


import com.goldcn.common.model.DataResult;

/**
 * Created by Administrator on 2016/6/2.
 */
public enum DataResultEnum {

    ERROR(errorResult()), SUCC(succDataResult());

    private DataResult dataResult;

    DataResultEnum(DataResult dataResult) {
        this.dataResult = dataResult;
    }

    public DataResult getValue() {
        return dataResult;
    }

    private static DataResult errorResult(){
        DataResult dataResult=new DataResult();
        dataResult.setIsSuccess(0);
        dataResult.setErrorCode("0001");
        dataResult.setErrorDesc("SMS failure");
        return dataResult;
    }

    private static DataResult succDataResult(){
        DataResult dataResult=new DataResult();
        dataResult.setIsSuccess(1);
        dataResult.setData(1);
        return dataResult;
    }


}
